import request from '@/utils/request'

// 查询套餐列表
export function listCoupons(query) {
  return request({
    url: '/products/coupons/list',
    method: 'get',
    params: query
  })
}

// 查询套餐详细
export function getCoupons(id) {
  return request({
    url: '/products/coupons/' + id,
    method: 'get'
  })
}

// 新增套餐
export function addCoupons(data) {
  return request({
    url: '/products/coupons',
    method: 'post',
    data: data
  })
}

// 修改套餐
export function updateCoupons(data) {
  return request({
    url: '/products/coupons',
    method: 'put',
    data: data
  })
}

// 删除套餐
export function delCoupons(id) {
  return request({
    url: '/products/coupons/' + id,
    method: 'delete'
  })
}
